package org.tysite.tyservice.example.validation.dto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 兴趣爱好
 * @author tysite
 * @date 2020/3/4 0004 22:44
 */
public class AmateurDTO implements Serializable {
    
    private static final long serialVersionUID = -5636430265876663921L;
    
    @NotNull(message = "兴趣爱好的id不能为空")
    private Integer id;
    
    @NotBlank(message = "兴趣爱好的名称不能为空")
    @Size(max = 50, message = "兴趣爱好的长度必须在1~50之间")
    private String name;
    
    public Integer getId() {
        return id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    @Override
    public String toString() {
        return "AmateurDTO{" +
            "id=" + id +
            ", name='" + name + '\'' +
            '}';
    }
}
